//
//  UIApplicationExtension.swift
//  YYProject
//
//  Created by 陆文宇 on 2017/8/10.
//  Copyright © 2017年 陆文宇. All rights reserved.
//

import UIKit

extension UIApplication {
    
    static var yy_appVersion: String {
        let infoDictionary = Bundle.main.infoDictionary
        let majorVersion = infoDictionary!["CFBundleShortVersionString"]
        let appversion = majorVersion as! String
        return appversion
    }
    
    static func yy_gotoAppUrl(_ url: String) {
        guard !url.isEmpty else {
            return
        }
        
        if UIApplication.shared.canOpenURL(URL(string: url)!) {
            UIApplication.shared.openURL(URL(string: url)!)
        }
    }
    
}
